<template>
  <div class="wrapper">
    <el-input tyep="text" v-bind="$attrs" v-on="$listeners" v-model.lazy="message"></el-input>
    <el-button @click="handleClick">添加</el-button>
  </div>
</template>
<script>
export default{
  name: "AddNewInputComp",
  inject: ['model'],
  data(){
    return {
      message: ""
    }
  },
  methods:{
    async handleClick(){
      await this.model.editorData({content: this.message})
      this.$emit("AddNewMessage", this.model.data.data);
      this.message = "";
    }
  }
}
</script>